<!--
 * @Description: 
 * @Author: YaoXiaotTian
 * @Date: 2021-05-29 20:07:52
 * @LastEditors: YaoXiaoTian
 * @LastEditTime: 2021-06-02 14:53:23
-->
<template>
  <div class="specialty_com_wrap" @click="goDetail">
    <el-image :src="content.titlePicStr" fit="fill"></el-image>
    <div class="description">{{ content.productName }}</div>
    <div class="sp_footer">
      <span>{{ `已售${content.buyNum}` }}</span>
      <span>{{
        `￥${content.productPriceMin || "0.00"}-${content.productPriceMax ||
          "0.00"}`
      }}</span>
    </div>
  </div>
</template>

<script>
export default {
  props: ["content"],
  data() {
    return {};
  },
  methods: {
    goDetail() {
      this.$router.push({
        path: "/goods/details",
        query: {
          id: this.content.id,
          saleNum: this.content.buyNum,
        },
      });
    },
  },
};
</script>

<style lang="less" scoped>
.specialty_com_wrap {
  width: 282px;
  background: #ffffff;
  border: 1px solid #e7e7e7;
  /deep/ .el-image {
    width: 282px;
    height: 277px;
  }
  .description {
    margin: 0 19px 15px 24px;
    font-size: 16px;
    font-weight: 400;
    height: 42px;
    color: #333333;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .sp_footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin: 0 21px 18px 27px;
    span:first-child {
      font-size: 14px;
      font-weight: 400;
      color: #999999;
    }
    span:last-child {
      font-size: 24px;
      font-weight: 400;
      color: #f97534;
      &::first-letter {
        font-size: 14px;
      }
    }
  }
}
</style>
